import request from '@/utils/request'

// 获取摊位分区列表
export function fetchPartitions() {
  return request({
    url: 'api/v2/backend/partition',
    method: 'post'
  })
}


export function remove(id) {
  const data = { id: id }
  return request({
    url: 'api/v2/backend/partition/del',
    method: 'post',
    data
  })
}

export function add(name) {
  const data = { name: name }
  return request({
    url: 'api/v2/backend/partition/add',
    method: 'post',
    data
  })
}

export function edit(id, name) {
  const data = { id, name }
  return request({
    url: 'api/v2/backend/partition/edit',
    method: 'post',
    data
  })
}